﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 软构第一次作业
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
           Application.EnableVisualStyles();
           Application.SetCompatibleTextRenderingDefault(false);
            Form1 Register = new Form1();
            Register.ShowDialog();
            if (Register.DialogResult == DialogResult.OK)
            {
                Register.Dispose();
                Application.Run(new Form2()); //跳转form2
            }
            else if (Register.DialogResult == DialogResult.Cancel)
            {
                Register.Dispose();
                Application.Run(new Form3());  //跳转到form3
            }

            demo p = new demo();
            int[] arr = { 1, 3, 4, 5, 6, 8, 9, 4 };
            for (int i = 0; i < arr.Length; i++)
            {
                Console.Write(arr[i] + " ");
            }
            Console.WriteLine("\r\n");
            Console.WriteLine("求最大值的结果为"+p.Getmax(arr));
            Console.WriteLine("求最小值的结果为" + p.Getmin(arr));
            Console.WriteLine("求均值的结果为" + p.Getavg(arr));
            Console.WriteLine("求总和的结果为" + p.Getsum(arr));
            int a = 3;
            int b = 87;
            Console.WriteLine("上限为" + b + "," + "下限为" + a);
            p.getallprime(a, b);

        }
    }
}
